In many computer systems, data are stored and fetched for respective files. This is realized such that a file system partially constituting an operating system (OS) abstracts a storage device to perform a data storing process and a data loading process.
FIG. 8 is a diagram showing the structure of a general file handled by the file system.
A file 701 comprises a file body 703 and an i-node 702 which is management information of the file body 703. The i-node includes pieces of information such as identification information of a device serving as an actual storage medium, position information related to a file storage device, a file name including an extension of a file, and a file size.
A process of forming a file system which handles the file 701 and a process of storing the file 701 by the file system will be described below with reference to FIG. 9.
The process of forming a file system will be described first.
When a file system forming command C811 is executed in a user space, an initialization/operation preparing unit 812 performs, in a kernel space, initialization and operation preparation for a file system control block of a device serving file system formation target to form a file system 801.
The file storing process will be described next.
The storing process comprises two-step processes including preparation of an i-node serving as file management information and actual writing of a file. When an open system call SC821 is issued as the first step process, a preparing unit 822 prepares a file i-node in the file system 801 in the kernel space. The preparing unit 822 returns a file descriptor FS1 associated with the file i-node to the user space.
As the second-step process, a write system call CS831 is issued from the user space by using a file descriptor as an argument which is a return value of the above open system call.
At this time, a free region securing unit 833 refers to the i-node in the file system 801 in the kernel space through the file descriptor FS2 to secure a free region of the device, and outputs an actual write request to a write request unit 834. With the above two-step processes, file storage is performed.
US Patent Application Publication No. 2004/0024796 describes a technique which selects a proper device for each type of a business applications of generating a file and stores the file.